package test.y2021;

import cn.hutool.core.lang.Console;
import common.dto.SupplierDetail;
import common.interfaceClass.WatchOut;

import java.lang.reflect.Proxy;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author song
 * @date 2021/11/24 14:11
 */
public class November4 {
    public static void main(String[] args) {
        SupplierDetail supplierDetail = new SupplierDetail();
        Object o = Proxy.newProxyInstance(
                WatchOut.class.getClassLoader(), new Class[]{WatchOut.class},
                (proxy, method, args1) -> {
                    Console.error("------->>>>");
                    return method.invoke(supplierDetail);
                });
        System.err.println(o);
        supplierDetail.la();
        supplierDetail.see();
    }
}
